/**
 * Created by joustany on 17/6/16.
 */
var configApi = function (theInterface) {
    var link = '';
    if (location.host.indexOf('t.m.antfre.com') > -1) {
        link = "http://t.api.antfre.com" + theInterface;
    }
    else if (location.host.indexOf('m.antfre.com') > -1){
        link = "https://api.antfre.com" + theInterface;
    }
    else {
        // console.log(location.host);
        link = "http://t.api.antfre.com" + theInterface;
    }

    return link;
};

var configFrontUrl = function (FrontUrl) {
    var link = '';
    if (location.host.indexOf('t.m.antfre.com') > -1) {
        link = "http://t.m.antfre.com" + FrontUrl;
    }
    else if (location.host.indexOf('m.antfre.com') > -1){
        link = "https://m.antfre.com" + FrontUrl;
    }
    else {
        link = "http://t.m.antfre.com" + FrontUrl;
    }

    return link;
};

var APPId = function () {
    var appid = '';
    if (location.host.indexOf('t.m.antfre.com') > -1) {
        appid = "wxdadda9dbadec524d";
    }
    else if (location.host.indexOf('m.chjidun.com') > -1){
        appid = "wxdadda9dbadec524d";
    }
    else {
        appid = "wxdadda9dbadec524d";
    }

    return appid;
};
function ajaxStart() {
    $(document).ajaxStart(function(event,xhr,options){
        "use strict"
        $('.loding').show()
    })
}
function ajaxComplete() {
    $(document).ajaxComplete(function(event,xhr,options){
        "use strict"
        $('.loding').hide()
    })
}
